3 add index exch 2 add index dup 4 1 roll sub mul add counttomark 1 add 1 roll cleartomark} counttomark dup 3 add -1 roll exch 2 sub mul dup floor cvi dup 3 1 roll sub exch dup {exch pop abs 1 exch sub} {abs exch abs 2 copy add 1 gt{1 sub dup mul exch 1 sub dup mul add 1 sub}{dup mul exch dup mul add 1 exch sub}ifelse} /yxlate dh sy mul neg def x0 y0 translate w h imbits[sx 0 0 sy 0 yxlate]{cyanrp}{magentarp}{yellowrp}{blackrp}true 4 colorimage}def /sx w dw div def/sy h dh div neg def /tweakfunc load AldSettransfer freq angle/spotfunc load setscreen /AldSettransfer{fixtransfer}def % % *** redefine settransfer *** /cyanbuf w imbits mul 7 add 8 idiv string def cyanbuf length dup dup/magentabuf exch string def/yellowbuf exch string def/blackbuf exch string def /S_IMAGEV3{/iminv true store/tweakfunc xdf/spotfunc xdf/angle xdf/freq xdf/imbits exch store/h xdf/w xdf 10 div/dh xdf 10 div/dw xdf 10 div/y0 xdf 10 div/x0 xdf/AsBin xdf /yxlate dh sy mul neg def x0 y0 translate w h iminv not[sx 0 0 sy 0 yxlate]{currentfile imbuf readhexstring pop}imagemask}def /S_IMAGEMASKV3{/clr xdf/iminv exch not store/h xdf/w xdf 10 div/dh xdf 10 div/dw xdf 10 div/y0 xdf 10 div/x0 xdf/AsBin xdf/sx w dw div def/sy h dh div neg def/imbuf w 7 add 8 idiv string def